Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

io_queue: rename io_desc_read_write to queued_io_request_completion #2339

Conversation

pwrobelse
Copy link
Contributor

This patch is a part of the preparation to route discard requests via I/O scheduler.

The mentioned 'io_desc_read_write' is used to track the completion of read and write requests submitted to 'io_sink'. It implements 'io_completion' interface -- its functions are invoked when the processing of a request via 'reactor_backend' is finished.

In spite of the fact that 'fallocate()' is not supported by Linux AIO and therefore, discards will not be submitted to 'io_sink' and processed by 'reactor_backend', discard requests will need to notify 'io_queue' about completion in the same way that reads and writes do. Thus, to avoid code duplication 'io_desc_read_write' is renamed to 'queued_io_request_completion' as it will be used by discard requests.

This patch is a part of the preparation to route discard requests
via I/O scheduler.

The mentioned 'io_desc_read_write' is used to track the completion
of read and write requests submitted to 'io_sink'. It implements
'io_completion' interface - its functions are invoked when the
processing of a request via 'reactor_backend' is finished.

In spite of the fact that 'fallocate()' is not supported by Linux AIO
and therefore, discards will not be submitted to 'io_sink' and processed
by 'reactor_backend', discard requests will need to notify 'io_queue'
about completion in the same way that reads and writes do. Thus, to avoid
code duplication 'io_desc_read_write' is renamed to 'queued_io_request_completion'
as it will be used by discard requests.

Signed-off-by: Patryk Wrobel <[email protected]>
@pwrobelse pwrobelse force-pushed the ioq_preparation_for_discard_rename_io_desc_read_write branch from c2fedbc to 77f2061 Compare July 8, 2024 15:16
@pwrobelse pwrobelse marked this pull request as ready for review July 8, 2024 16:15
@pwrobelse pwrobelse requested a review from xemul July 8, 2024 16:15
@xemul
Copy link
Contributor

xemul commented Jul 9, 2024

In #2319 you merged this class with queued_io_request. Since it's not yet clear what the final solution is going to look like, let's postpone with this rename for a while

@pwrobelse
Copy link
Contributor Author

In #2319 you merged this class with queued_io_request. Since it's not yet clear what the final solution is going to look like, let's postpone with this rename for a while

Hi, I have just closed that PR -- merging those classes was not required. Also, you pointed out some problems with it. I added rationale to the comment that closes the PR#2319.

@pwrobelse
Copy link
Contributor Author

Closing in favor of: #2386

@pwrobelse pwrobelse closed this Aug 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants